/*
 * @Author: yxiawen
 * @Date: 2022-01-14 22:18:35
 * @LastEditTime: 2022-01-24 15:47:15
 * @LastEditors: yxiawen
 * @Description:
 * @FilePath: /vite-project/src/router/index.js
 */
import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/home",
      component: () => import("@/views/home/home.vue")
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/components/login")
    },
    {
      path: "/",
      component: () => import("@/layout"),
      redirect: "/bannerMgt",
      meta: {
        index: 1
      },
      children: [
        {
          path: "/bannerMgt",
          component: () => import("@/views/bannerMgt/bannerMgt.vue"),
          name: "BannerMgt"
        },
        {
          path: "/unitMgt",
          component: () => import("@/views/unitMgt/unitMgt.vue")
        },
        {
          path: "/fillingOut",
          component: () => import("@/views/fillingOut/fillingOut.vue")
        },
        {
          path: "/areaMgt",
          component: () => import("@/views/areaMgt/areaMgt.vue")
        },
        {
          path: "/uniTypeMgt",
          component: () => import("@/views/uniTypeMgt/uniTypeMgt.vue")
        },
        {
          path: "/statistics",
          component: () => import("@/views/statistics/statistics.vue")
        },
        {
          path: "/questionMgt",
          component: () => import("@/views/questionMgt/questionMgt.vue")
        }
        // { path: "/dashboard/analysis", component: Dashboard },
        // { path: "/dashboard/monitor", component: NotFound },
        // { path: "/dashboard/workplace", component: NotFound }
      ]
    }
  ]
});

export default router;
